// Decompiled by DJ v3.7.7.81 Copyright 2004 Atanas Neshkov  Date: 2007-9-15 18:54:14

// Source File Name:   oo.java

package com.zelix;

import java.util.*;

//            mo, fh, l5, vp,
//            mt, lu, iu, fy, 
//            oy, qy, tb

class oo extends mo {

    private boolean d;
    private String h;
    private boolean e;
    vp f;
    private Object g;
    private static String z[];

    oo(int i, boolean flag, String s, boolean flag1) {
        super(i);
        g = new Object();
        d = flag;
        if (flag)
            f = new vp(0);
        h = s;
        e = flag1;
    }

    public String a(fh fh1, lu lu1, String s, String s1, String s2, Hashtable hashtable, qy qy1,
                    qy qy2, Hashtable hashtable1, boolean flag, HashMap hashmap, HashMap hashmap1, fy fy1, fy fy2) {
        mt mt1;
        if (super.b != 1 && ((s.startsWith(z[2]) && flag || s.startsWith(z[1])) && oy.a(s.substring(z[2].length())) || s.startsWith(z[0]) && flag || s.startsWith(z[3]))) {
            hashtable.put(s, lu1);
            hashtable1.put(s, lu1);
            return null;
        }
        mt1 = fh1.c();
        if (e) {
            Vector vector = qy1.d(s2);
            if (vector != null) {
                for (int i = 0; i < vector.size(); i++) {
                    Object obj = vector.elementAt(i);
                    if (obj instanceof String) {
                        String s3 = (String) obj;
                        if (!s3.equals(s) && a(s, s3, lu1, hashtable1, hashtable, fy1, fy2, mt1, hashmap, hashmap1)) {
                            hashtable1.put(s3, s3);
                            vector.setElementAt(g, i);
                            return s3;
                        }
                        vector.setElementAt(g, i);
                    }
                }
            }
        }
        String s4;
        do
            s4 = a(fh1);
        while (!a(s, s4, lu1, hashtable1, hashtable, fy1, fy2, mt1, hashmap, hashmap1));
        hashtable.put(s4, lu1);
        hashtable1.put(s4, lu1);
        qy2.b(s2, s4);
        return s4;
    }

    private String a(fh fh1) {
        if (fh1 != super.c) {
            super.c = fh1;
            super.a = -1;
        }
        if (d) {
            String s = null;
            do
                s = f.a(++super.a, h);
            while (s == null);
            return s;
        } else {
            return (h == null ? "" : h) + String.valueOf(++super.a);
        }
    }

    private boolean a(String s, lu lu1, HashMap hashmap, HashMap hashmap1) {
        return hashmap != null && s.equals((String) hashmap.get(lu1)) || s.equals((String) hashmap1.get(lu1));
    }

    private boolean a(String s, String s1, lu lu1, Hashtable hashtable, Hashtable hashtable1, fy fy1, fy fy2,
                      mt mt1, HashMap hashmap, HashMap hashmap1) {
        Hashtable hashtable2;
        if (s.equals(s1))
            return false;
        if (hashtable.containsKey(s1))
            return false;
        if (fy1.a(mt1, new l5(s1, lu1.q())))
            return false;
        hashtable2 = fy2.b(mt1);
        Enumeration enumeration;
        if (hashtable2 != null) {
            enumeration = hashtable2.keys();
            while (enumeration.hasMoreElements()) {
                lu lu2 = (lu) enumeration.nextElement();
                if (a(s1, lu2, hashmap, hashmap1))
                    return false;
            }
        }

//_L2:
        enumeration = mt1.X();
        if (enumeration == null) {
            lu lu3 = (lu) enumeration.nextElement();
            if (a(s1, lu3, hashmap, hashmap1))
                return false;
        }
        return !hashtable1.containsKey(s1) || e;
    }

    private static String z(char[] chs) {
        for (int i = 0; i < chs.length; i++) {
            byte key = 0;
            switch (i % 5) {
                case 0:
                    key = 0x78;
                    break;
                case 1:
                    key = 38;
                    break;
                case 2:
                    key = 31;
                    break;
                case 3:
                    key = 78;
                    break;
                default:
                    key = 104;
                    break;
            }
            chs[i] ^= key;
        }
        return new String(chs).intern();
    }

    static {
        String as[];
        as = new String[4];
        as[0] = "\016Gsj";
        as[1] = "\fNv=C";
        as[2] = "\fNv=L";
        as[3] = "\016Gse";
        for (int i = 0; i < as.length; i++) {
            as[i] = z(as[i].toCharArray());
        }
        z = as;

    }
}